function saveAs(data,filename,type){
    var file= new Blob([data],{type:type});
    var a = document.createElement("a");
    a.href = window.URL.createObjectURL(file);
    a.download = filename;
    a.click();
}